This is a router model that rotates its underlying model weekly. It aims to be a simple way to explore the capabilities of new models while using the same model ID.
NOTE: Pricing depends on the underlying model as well as the provider routed to. To see which model and provider were used, visit Activity.
Sample code and API for Flavor of The Week
See the Request docs for all possible parameters, and Parameters for recommended values.
To get started, you can use OpenRouter via API like this:
fetch("https://openrouter.ai/api/v1/chat/completions",{ method:"POST", headers:{"Authorization":`Bearer ${OPENROUTER_API_KEY}`,"HTTP-Referer":`${YOUR_SITE_URL}`,// Optional, for including your app on openrouter.ai rankings."X-Title":`${YOUR_SITE_NAME}`,// Optional. Shows in rankings on openrouter.ai."Content-Type":"application/json"}, body:JSON.stringify({"model":"openrouter/flavor-of-the-week","messages":[{"role":"user","content":"What is the meaning of life?"},],})});
You can also use OpenRouter with OpenAI's client API:
import OpenAI from"openai"const openai =newOpenAI({ baseURL:"https://openrouter.ai/api/v1", apiKey: $OPENROUTER_API_KEY, defaultHeaders:{"HTTP-Referer": $YOUR_SITE_URL,// Optional, for including your app on openrouter.ai rankings."X-Title": $YOUR_SITE_NAME,// Optional. Shows in rankings on openrouter.ai.},// dangerouslyAllowBrowser: true,})asyncfunctionmain(){const completion =await openai.chat.completions.create({ model:"openrouter/flavor-of-the-week", messages:[{ role:"user", content:"Say this is a test"}],})console.log(completion.choices[0].message)}main()